<template>
    <div class="pjtCorp">
        <div class="tabs">
            <Tabs v-model="tabActiveName" @on-click="setTabClick">
                <TabPane :label="`全部（${count > 99 ? '99+' : count}）`" name="0"></TabPane>
                <TabPane v-for="item in corpTypeList" :key="item.id" :label="item.name" :name="String(item.id)"></TabPane>
            </Tabs>
        </div>
        <div class="search">
            <div class="list">
                <input type="password" autocomplete="new-password" style="display: none"/>
                <Input search enter-button v-model="keyword" placeholder="请输入合作单位名称" style="width: 470px" @on-search="searchAll" clearable/>
                <el-button @click="updateRow(0)" :type="!btnList.includes('prj/corp/add') ? 'info' : 'primary' " :disabled="!btnList.includes('prj/corp/add')" size="small">+ 新增合作单位</el-button >
            </div>
        </div>
        <div class="table">
            <el-table :data="list" :stripe="true" :height="tableHeight">
                <el-table-column prop="corpName" label="单位名称" width="180"></el-table-column>
                <el-table-column prop="corpTypeName" label="单位类型"></el-table-column>
                <el-table-column prop="legalMan" label="法人">
                    <template slot-scope="scope">
                        <div>{{ scope.row.legalMan ? scope.row.legalMan : "—" }} </div>
                    </template>
                </el-table-column>
                <el-table-column prop="legalManPhone" label="法人电话">
                    <template slot-scope="scope">
                        <div>{{ scope.row.legalManPhone ? scope.row.legalManPhone : "—" }}</div>
                    </template>
                </el-table-column>
                <el-table-column prop="registerDate" label="注册日期">
                    <template slot-scope="scope">
                        <div>{{ scope.row.registerDate ? scope.row.registerDate : "—" }}</div>
                    </template>
                </el-table-column>
                <el-table-column prop="deptName" label="所属项目" ></el-table-column>
                <el-table-column label="操作" align="center" class-name="tableBtn">
                    <template slot-scope="scope">
                        <el-button @click.native.prevent="getDetails(scope.$index, list)" :disabled="!btnList.includes('prj/corp/edit')" type="text" size="small" v-preventReClick="1500">
                            <img src="../../assets/images/prj/corp/project_details.png" style="width: 20px; height: 20px"/>
                        </el-button>
                        <el-button
                            style="color: red"
                            :disabled="!btnList.includes('prj/corp/del')"
                            @click.native.prevent="remove(scope.$index, list)"
                            type="text"
                            size="small">
                            <img src="../../assets/images/prj/corp/project_del.png" style="width: 20px; height: 20px" />
                        </el-button>
                    </template>
                </el-table-column>
            </el-table>
        </div>
        <div
            class="clearfix"

            style="width: 100%;padding-bottom: 20px;background-color: #ffffff;">
            <div class="float-right">
                <Page
                    v-if="totalCount"
                    style="text-align: center"
                    :current.sync="current"
                    :total="totalCount"
                    :page-size="pageSize"
                    show-elevator
                    show-total
                    @on-change="pageChange"
                >
                </Page>
            </div>
        </div>

        <Modal v-model="deleteModal" title="删除" width="360px;" :mask-closable="false" >
            <div style="margin: 10px">确定要删除这条数据吗？</div>
            <div slot="footer">
                <el-button @click="cancel(2)" type="info" size="small" plain>取消</el-button>
                <el-button @click="detele" type="primary" size="small" plain>确定</el-button>
            </div>
        </Modal>

        <Modal v-model="updateModal" :title="isAdd ? '新增合作单位' : '编辑合作单位'" width="1000px" :mask-closable="false" >
            <div class="msg">
                <h2>合作单位</h2>
                <div class="list">
                    <div class="item">
                        <span class="tip">*</span>
                        <span>单位名称:</span>
                        <Input v-model="crop.corpName" placeholder="请输入单位名称" style="width: 300px" clearable/>
                    </div>
                    <div class="item">
                        <span class="tip">*</span>
                        <span>合作单位类型:</span>
                        <Select v-model="crop.corpTypeId" style="width: 300px" placeholder="请选择合作单位类型" @on-change="getcorpType" >
                            <Option v-for="item in corpTypeList" :value="item.id" :key="item.id" >{{ item.name }}</Option>
                        </Select>
                    </div>
                </div>
                <div class="list">
                    <div class="item">
                        <span>社会信用代码类型:</span>
                        <Select v-model="crop.corpCodeType" style="width: 300px" placeholder="请选择社会信用代码类型" @on-change="getcorpCodeType" >
                            <Option v-for="item in corpCodeTypeList" :value="item.id" :key="item.id" >{{ item.name }}</Option>
                        </Select>
                    </div>
                    <div class="item">
                        <span class="tip">*</span>
                        <span>单位代码:</span>
                        <Input v-model="crop.corpCode" placeholder="请输入单位代码" style="width: 300px" clearable/>
                    </div>
                </div>
                <div class="list">
                    <div class="item">
                        <span>注册时间:</span>
                        <DatePicker
                            type="date"
                            placeholder="请选择注册时间"
                            style="width: 300px"
                            v-model="crop.registerDate"
                            :clearable="false"
                        ></DatePicker>
                    </div>
                    <div class="item">
                        <span>经营范围:</span>
                        <Input v-model="crop.bizScope" placeholder="请输入经营范围" style="width: 300px" clearable/>
                    </div>
                </div>
                <h2 style="margin-top: 20px">法人</h2>
                <div class="list">
                    <div class="item">
                        <span>法人姓名:</span>
                        <Input v-model="crop.legalMan" placeholder="请输入法人姓名" style="width: 300px" clearable/>
                    </div>
                    <div class="item">
                        <span>法人电话:</span>
                        <Input v-model="crop.legalManPhone" placeholder="请输入法人电话" style="width: 300px" clearable/>
                    </div>
                </div>
                <h2 style="margin-top: 20px">地址</h2>
                <div class="list">
                    <div class="item">
                        <span>省市区:</span>
                        <el-cascader
                            style="width: 300px"
                            expand-trigger="hover"
                            v-model="industry"
                            :clearable="true"
                            :options="CArr1"
                            size="small"
                            @change="handleChange"
                            placeholder="请选择省市区"
                        >
                        </el-cascader>
                    </div>
                    <div class="item">
                        <span>地址:</span>
                        <Input v-model="crop.address" placeholder="请输入地址" style="width: 300px" clearable/>
                    </div>
                </div>
                <h2 style="margin-top: 20px">所属项目</h2>
                <div class="list">
                    <div class="item">
                        <span>所属项目:</span>
                        <Input v-model="porjectName" :disabled="true" style="width: 300px" clearable/>
                    </div>
                </div>
            </div>
            <div slot="footer">
                <el-button @click="cancel(1)" type="info" size="small" plain >取消</el-button>
                <!-- <el-button @click="preview" type="primary" size="small" plain>预览</el-button> -->
                <el-button @click="submitAll" type="primary" size="small" plain v-preventReClick="1500" >确定</el-button>
            </div>
        </Modal>

        <Modal v-model="detailModal" width="800px" :mask-closable="false" :title="detailsObj.corpName" :footer-hide="true" >
            <div class="msg" style="margin-top: -20px">
                <div class="tags">
                    <div class="title">
                        <h2>合作单位</h2>
                        <el-button type="primary" @click="edit_details" v-if="!isAdd" size="small" plain >编辑</el-button>
                    </div>
                    <div class="list">
                        <div class="item">
                            <span>单位名称:</span>
                            <span>{{ detailsObj.corpName }}</span>
                        </div>
                        <div class="item">
                            <span>合作单位类型:</span>
                            <span>{{ detailsCorpTypeName }}</span>
                        </div>
                    </div>
                    <div class="list">
                        <div class="item">
                            <span>单位代码:</span>
                            <span>{{ detailsObj.corpCode }}</span>
                        </div>
                        <div class="item">
                            <span>社会信用代码类型:</span>
                            <span v-if="detailsObj.corpCodeType == 1">社会信用代码</span>
                            <span v-if="detailsObj.corpCodeType == 2">组织机构代码</span>
                        </div>
                    </div>
                    <div class="list">
                        <div class="item" style="width: 100%">
                            <span>经营范围:</span>
                            <span style="flex:1">{{ detailsObj.bizScope }}</span>
                        </div>
                    </div>
                    <div class="list">
                        <div class="item">
                            <span>注册日期:</span>
                            <span>{{ detailsObj.registerDate }}</span>
                        </div>
                    </div>
                </div>
                <div class="tags">
                    <h2>法人</h2>
                    <div class="list">
                        <div class="item">
                            <span>法人姓名:</span>
                            <span>{{ detailsObj.legalMan }}</span>
                        </div>
                        <div class="item">
                            <span>法人电话:</span>
                            <span>{{ detailsObj.legalManPhone }}</span>
                        </div>
                    </div>
                </div>
                <div class="tags">
                    <h2>地址</h2>
                    <div class="list">
                        <div class="item">
                            <span>省份城市:</span>
                            <span>{{ detailsObj.province }}{{ detailsObj.city }}{{ detailsObj.area }}</span>
                        </div>
                        <div class="item">
                            <span>详细地址:</span>
                            <span style="flex:1">{{ detailsObj.address }}</span>
                        </div>
                    </div>
                </div>
                <div class="tags">
                    <h2>所属项目</h2>
                    <div class="list">
                        <div class="item">
                            <span>所属项目:</span>
                            <span>{{ porjectName }}</span>
                        </div>
                    </div>
                </div>
            </div>
        </Modal>
    </div>
</template>

<script>
import { format, formatInItDate } from "@/sever/utils.js";
import { list } from "@/sever/list.js";
import {
    getBoardProjectList,
    getAlldeptList,
    getTypeList,
    getCorpList,
    getCorpDetails,
    getCorpAdd,
    getCorpEdit,
    getCorpRemove,
} from "@/api/api.js";
export default {
    data() {
        return {
            tabActiveName: "0",
            count: 0,
            current: 1,
            pageSize: 10,
            pageNum: 1,
            totalCount: "",
            keyword: "",
            corpType: "",
            corpTypeList: [],
            list: [],
            deleteModal: false,
            detailModal: false,
            removeId: "",
            isAdd: true,
            updateModal: false,
            crop: {
                corpTypeId: "",
                corpName: "",
                corpCode: "",
                corpCodeType: "",
                bizScope: "",
                legalMan: "",
                legalManPhone: "",
                province: "",
                city: "",
                area: "",
                address: "",
                registerDate: "",
                deptId: "",
            },
            id: "",
            corpCodeTypeList: [
                {
                    id: 1,
                    name: "社会信用代码",
                },
                {
                    id: 2,
                    name: "组织机构代码",
                },
            ],
            btnList: [],
            detailsObj: {},
            detailsCorpTypeName: "",
            isEdit: false,
            detailsIndex: "",
            detailsRows: "",
            detailsCorpName: "",
            selectedOptions: [],
            selectedOptions2: [],
            CArr: list(),
            CArr1: [],
            industry: [],
            type: "",
            porjectType: "",
            porjectName: "",
            tableHeight: window.innerHeight - 345,
        };
    },
    computed: {
        porjectObject() {
            return this.$store.state.porjectObject;
        },
    },
    watch: {
        porjectObject(val, oldVal) {
            if (val.deptId != oldVal.deptId) {
                this.porjectType = val.deptId;
                this.porjectName = val.name;
                this.pageNum = 1;
                this.current = 1;
                this.keyword = "";
                this.corpType = "";
                this.getAllList();
            }
        },
    },
    methods: {
        // headClass(){
        //     return 'color: #666666;background: #CCDEEE !important;'
        // },
        setTabClick(name) {
            if (name == "0") {
                name = "";
            }
            this.pageNum = 1;
            this.current = 1;
            this.corpType = name;
            this.getAllList();
        },
        //合作单位类型
        getcorpTypeList() {
            let params = {
                code: "corp_type",
            };
            getTypeList(params)
                .then((res) => {
                    if (res.code == 200) {
                        this.corpTypeList = res.data.childList;
                    } else {
                        this.$Message.warning(res.msg);
                    }
                })
                .catch((error) => {
                    console.log(error);
                });
        },
        //获取省市级三级联动
        getCascader() {
            this.arr = this.CArr;
            for (let i in this.arr) {
                this.arr[i].value = this.arr[i].id;
                this.arr[i].label = this.arr[i].name;
                this.arr[i].children = this.arr[i].childList;
                delete this.arr[i].id;
                delete this.arr[i].name;
                delete this.arr[i].childList;
                for (let j in this.arr[i].children) {
                    this.arr[i].children[j].value = this.arr[i].children[j].id;
                    this.arr[i].children[j].label =
                        this.arr[i].children[j].name;
                    this.arr[i].children[j].children =
                        this.arr[i].children[j].childList;
                    delete this.arr[i].children[j].id;
                    delete this.arr[i].children[j].name;
                    delete this.arr[i].children[j].childList;
                    for (let k in this.arr[i].children[j].children) {
                        this.arr[i].children[j].children[k].value =
                            this.arr[i].children[j].children[k].id;
                        this.arr[i].children[j].children[k].label =
                            this.arr[i].children[j].children[k].name;
                        delete this.arr[i].children[j].children[k].id;
                        delete this.arr[i].children[j].children[k].name;
                    }
                }
            }

            this.CArr1 = this.arr;
        },
        getTreeData(data) {
            // 循环遍历json数据
            for (var i = 0; i < data.length; i++) {
                if (data[i].children.length < 1) {
                    // children若为空数组，则将children设为undefined
                    data[i].children = undefined;
                } else {
                    // children若不为空数组，则继续 递归调用 本方法
                    this.getTreeData(data[i].children);
                }
            }
            return data;
        },

        handleChange(index) {
            this.crop.province = index[0];
            this.crop.city = index[1];
            this.crop.area = index[2];
        },
        //获取合作单位列表
        getAllList() {
            let params = {
                pageSize: this.pageSize,
                pageNum: this.pageNum,
                keyword: this.keyword,
                deptId: this.porjectType,
                corpTypeId: this.corpType,
            };
            getCorpList(params)
                .then((res) => {
                    if (res.code == 200) {
                        this.list = res.data.list;
                        this.totalCount = res.data.total;
                        if (!this.corpType) {
                            this.count = res.data.total;
                        }
                    } else {
                        this.$Message.warning(res.msg);
                    }
                })
                .catch((error) => {
                    console.log(error);
                });
        },
        getcorpType(index) {
            this.crop.corpTypeId = index;
        },
        getcorpCodeType(index) {
            this.crop.corpCodeType = index;
        },
        searchAll() {
            this.pageNum = 1;
            this.current = 1;
            if (this.corpType == undefined) {
                this.corpType = "";
            }
            this.getAllList();
        },
        pageChange(index) {
            if (this.corpType == undefined) {
                this.corpType = "";
            }
            this.pageNum = index;
            this.getAllList();
        },
        clear() {
            this.pageNum = 1;
            this.current = 1;
            this.keyword = "";
            this.corpType = "";
            this.getAllList();
        },
        updateRow(type, index, rows) {
            this.type = type;
            if (type == 0) {
                this.crop.corpTypeId = "";
                this.crop.corpName = "";
                this.crop.corpCode = "";
                this.crop.corpCodeType = "";
                this.crop.bizScope = "";
                this.crop.legalMan = "";
                this.crop.legalManPhone = "";
                this.crop.province = "";
                this.crop.city = "";
                this.crop.area = "";
                this.crop.address = "";
                this.crop.registerDate = "";
                this.industry = [];
                this.isAdd = true;
            } else {
                this.id = rows[index].corpId;
                this.isAdd = false;
                let params = {
                    corpId: rows[index].corpId,
                };
                getCorpDetails(params)
                    .then((res) => {
                        if (res.code == 200) {
                            this.crop.corpTypeId = res.data.corpTypeId;
                            this.crop.corpName = res.data.corpName;
                            this.crop.corpCode = res.data.corpCode;
                            this.crop.corpCodeType = res.data.corpCodeType;
                            this.crop.bizScope = res.data.bizScope;
                            this.crop.legalMan = res.data.legalMan;
                            this.crop.legalManPhone = res.data.legalManPhone;
                            this.crop.province = parseInt(res.data.province);
                            this.crop.city = parseInt(res.data.city);
                            this.crop.area = parseInt(res.data.area);
                            this.crop.address = res.data.address;
                            this.crop.registerDate = res.data.registerDate;
                            this.industry = [
                                res.data.province,
                                res.data.city,
                                res.data.area,
                            ];
                        } else {
                            this.$Message.warning(res.msg);
                        }
                    })
                    .catch((error) => {
                        console.log(error);
                    });
            }
            this.updateModal = true;
        },
        submitAll() {
            if (
                this.crop.corpTypeId == "" ||
                this.crop.corpTypeId == undefined
            ) {
                this.$Modal.warning({
                    title: "您有必填字段",
                    content: "请选择合作单位类型",
                });
                return;
            }
            if (this.crop.corpName == "") {
                this.$Modal.warning({
                    title: "您有必填字段",
                    content: "请填写单位名称",
                });
                return;
            }
            if (this.crop.corpCode == "") {
                this.$Modal.warning({
                    title: "您有必填字段",
                    content: "请填写单位代码",
                });
                return;
            }
            if (this.crop.legalManPhone != "") {
                if (!/^1[3456789]\d{9}$/.test(this.crop.legalManPhone)) {
                    this.$Modal.warning({
                        title: "您有必填字段",
                        content: "请填写正确的手机号",
                    });
                    return;
                }
            }
            let url;
            let obj = {};
            if (this.isAdd) {
                let params = {
                    corpTypeId: this.crop.corpTypeId,
                    corpName: this.crop.corpName,
                    corpCode: this.crop.corpCode,
                    corpCodeType: this.crop.corpCodeType,
                    bizScope: this.crop.bizScope,
                    legalMan: this.crop.legalMan,
                    legalManPhone: this.crop.legalManPhone,
                    province: this.crop.province,
                    city: this.crop.city,
                    area: this.crop.area,
                    address: this.crop.address,
                    registerDate: this.crop.registerDate
                        ? format(this.crop.registerDate, "YYYY-MM-DD")
                        : "",
                    deptId: this.porjectType,
                };
                getCorpAdd(params)
                    .then((res) => {
                        if (res.code == 200) {
                            this.success();
                        } else {
                            this.$Message.warning(res.msg);
                        }
                    })
                    .catch((error) => {
                        console.log(error);
                    });
            } else {
                var time;
                time = formatInItDate(this.crop.registerDate);
                let params = {
                    corpId: this.id,
                    corpTypeId: this.crop.corpTypeId,
                    corpName: this.crop.corpName,
                    corpCode: this.crop.corpCode,
                    corpCodeType: this.crop.corpCodeType,
                    bizScope: this.crop.bizScope,
                    legalMan: this.crop.legalMan,
                    legalManPhone: this.crop.legalManPhone,
                    province: this.crop.province,
                    city: this.crop.city,
                    area: this.crop.area,
                    address: this.crop.address,
                    registerDate: time,
                    deptId: this.porjectType,
                };
                getCorpEdit(params)
                    .then((res) => {
                        if (res.code == 200) {
                            this.success();
                        } else {
                            this.$Message.warning(res.msg);
                        }
                    })
                    .catch((error) => {
                        console.log(error);
                    });
            }
        },
        success() {
            this.$Message.success("操作成功");
            this.updateModal = false;
            this.pageNum = this.isAdd ? 1 : this.pageNum;
            this.current = this.isAdd ? 1 : this.current;
            if (this.corpType == undefined) {
                this.corpType = "";
            }
            this.getAllList();
        },
        remove(index, rows) {
            this.removeId = rows[index].corpId;
            this.deleteModal = true;
        },
        detele() {
            getCorpRemove(this.removeId)
                .then((res) => {
                    if (res.code == 200) {
                        this.$Message.success("操作成功");
                        this.pageNum = 1;
                        this.getAllList();
                        this.deleteModal = false;
                    } else {
                        this.$Message.warning(res.msg);
                    }
                })
                .catch((error) => {
                    console.log(error);
                });
        },
        getDetails(index, rows) {
            this.detailsIndex = index;
            this.detailsRows = rows;
            this.detailModal = true;
            this.isAdd = false;
            let params = {
                corpId: rows[index].corpId,
            };
            getCorpDetails(params)
                .then((res) => {
                    if (res.code == 200) {
                        this.detailsObj = res.data;
                        this.corpTypeList.forEach((i) => {
                            if (this.detailsObj.corpTypeId == i.id) {
                                this.detailsCorpTypeName = i.name;
                            }
                        });
                        for (let i in this.CArr1) {
                            if (
                                this.detailsObj.province == this.CArr1[i].value
                            ) {
                                this.detailsObj.province = this.CArr1[i].label;
                                for (let j in this.CArr1[i].children) {
                                    if (
                                        this.detailsObj.city ==
                                        this.CArr1[i].children[j].value
                                    ) {
                                        this.detailsObj.city =
                                            this.CArr1[i].children[j].label;
                                        for (let k in this.CArr1[i].children[j]
                                            .children) {
                                            if (
                                                this.detailsObj.area ==
                                                this.CArr1[i].children[j]
                                                    .children[k].value
                                            ) {
                                                this.detailsObj.area =
                                                    this.CArr1[i].children[
                                                        j
                                                    ].children[k].label;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    } else {
                        this.$Message.warning(res.msg);
                    }
                })
                .catch((error) => {
                    console.log(error);
                });
        },
        edit_details() {
            this.updateModal = true;
            this.detailModal = false;
            this.updateRow(1, this.detailsIndex, this.detailsRows);
        },
        preview() {
            if (this.type == 0) {
                this.detailsCorpName = "";
                this.detailsCorpTypeName = "";
            }
            this.detailModal = true;
            this.isAdd = this.isAdd ? true : false;
            let time;
            time = formatInItDate(this.crop.registerDate);
            this.detailsObj = {
                corpTypeId: this.crop.corpTypeId,
                corpName: this.crop.corpName,
                corpCode: this.crop.corpCode,
                corpCodeType: this.crop.corpCodeType,
                bizScope: this.crop.bizScope,
                legalMan: this.crop.legalMan,
                legalManPhone: this.crop.legalManPhone,
                province: this.crop.province,
                city: this.crop.city,
                area: this.crop.area,
                address: this.crop.address,
                registerDate: time,
                deptId: this.crop.deptId,
            };
            this.corpTypeList.forEach((i) => {
                if (this.crop.corpTypeId == i.id) {
                    this.detailsCorpTypeName = i.name;
                }
            });
            for (let i in this.CArr1) {
                if (this.detailsObj.province == this.CArr1[i].value) {
                    this.detailsObj.province = this.CArr1[i].label;
                    for (let j in this.CArr1[i].children) {
                        if (
                            this.detailsObj.city ==
                            this.CArr1[i].children[j].value
                        ) {
                            this.detailsObj.city =
                                this.CArr1[i].children[j].label;
                            for (let k in this.CArr1[i].children[j].children) {
                                if (
                                    this.detailsObj.area ==
                                    this.CArr1[i].children[j].children[k].value
                                ) {
                                    this.detailsObj.area =
                                        this.CArr1[i].children[j].children[
                                            k
                                        ].label;
                                }
                            }
                        }
                    }
                }
            }
        },
        cancel(type) {
            if (type == 1) {
                this.updateModal = false;
            } else if (type == 2) {
                this.deleteModal = false;
            }
        },
    },
    mounted() {
        this.porjectType = this.$store.state.porjectObject.deptId;
        this.porjectName = this.$store.state.porjectObject.name;
        this.getAllList();
        this.getcorpTypeList();
        this.getCascader();
        this.btnList = JSON.parse(localStorage.getItem("arr"));
    },
};
</script>


<style scoped lang="less">
@import "./../../assets/style/themeBase.less";

.pjtCorp {
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
    background: #f5f5f5;
    .tabs {
        background-color: #fff;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
        border-radius: 6px;
    }
    .table {
        margin-top: 10px;
        padding: 20px;
        border-radius: 6px;
        background-color: #fff;
        /deep/.el-table td, /deep/.el-table th {
            padding: 0;
            height: 60px;
            .cell {
                height: 60px;
                line-height: 60px;
            }
        }
        /deep/.el-table thead th .cell {
            display: flex;
            justify-content: center;
            align-items: flex-start;
            flex-direction: column;
        }
        /deep/.el-table td,
        /deep/.el-table th.is-leaf {
            border-bottom: none;
        }
        /deep/.tableBtn {
            .cell {
                align-items: center !important;
            }
        }

        img {
            width: 20px;
            height: 20px;
            vertical-align: middle;
        }
    }
    .search {
        background-color: #fff;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        .list {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 60px;
            &:last-of-type {
                margin-top: 0;
            }
        }
    }
}
.msg {
    width: 96%;
    margin: 0 auto;
    // margin-top: -20px;
    .tags {
        padding: 5px 10px;
        background: #fafafa;
        border-radius: 10px;
        margin-top: 20px;
        .title {
            width: 100%;
            display: flex;
            justify-content: space-between;
        }
    }
    p {
        font-size: 18px;
        margin-top: 20px;
        text-align: center;
    }
    h2{
        color: var(--themeColor) !important;
    }
    .list {
        width: 96%;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        margin-top: 15px;
        .item {
            display: flex;
            width: 50%;
            justify-content: flex-start;
            align-items: center;
            position: relative;
            padding-left: 16px;
            box-sizing: border-box;
            span {
                display: block;
                height: auto;
                width: 120px;
            }
            // span:first-child {
            //     width: 120px;
            // }
            .tip {
                width: 10px;
                position: absolute;
                top:8px;
                left: 0;
                color: red;
                font-size: 16px;
            }
        }
    }
}
</style>
